1. Field of the Invention
The present invention relates to a method and a device for compressing image data having a gradation property.
2. Description of the Prior Art
In general, a print system including a computer and a printer is used. As such a print system, there is a type in which a computer side performs an image processing such as a pseudo gradation process (a dither process) on image data to be printed so that a printer side does not need to perform a special process on the image data received from the computer and prints the image on a paper sheet just by using the image data.
Conventionally, a raster printer is known as a printer that is used for this type of print system. The raster printer can be made up of small scale hardware at a low cost since the printer side does not need to perform a special image processing. However, it has a disadvantage that a quantity of data to be transmitted increases since image data that can be printed on a paper sheet as they are should be transmitted. In addition, a recent request for a high quality of image makes image data have more volume size resulting in a greater quantity of data to be transmitted to the printer. For this reason, the transmission of image data from the computer to the printer needs much time.
In order to solve this problem, the computer side has to compress the image data. However, if a process for compression is complicated, the compression process itself needs much time. Furthermore, there is a case where an expansion process also needs much time if the expansion process is complicated. In this case, the printer side requires at large scale hardware for the expansion process at a high cost.
Therefore, it is desired to realize a compression technique that can perform compression with a small process load by small scale hardware to realize a high compressibility so as to realize a print system that can use an inexpensive printer and perform a high speed process as a whole.
In many cases, image data must be processed to have a pseudo gradation when the image data with a multi gradation is printed with a printer. As one of methods for realizing a pseudo gradation, a dither method is known well conventionally. The dither method uses a dither pattern and compares each of threshold levels of the dither pattern with a pixel value of each pixel of the image data so as to produce binary data or multivalued data.
One of compression techniques on the basis of the dither pattern is disclosed in Japanese unexamined patent publication No. 6-152986. According to the method disclosed in this document, binary image data are divided into blocks having a predetermined size. A reference pattern corresponding to the number of dots included in an arbitrary image block is compared with the image block. If the image block matches the reference pattern, it is assigned with a sign indicating the reference pattern. If the image block does not match the reference pattern, a result of the comparison is encoded.
In addition, as a compression technique for binary image data, a JBIG format is known, which is acknowledged by ITU-T recommendation (ITU represents International Telecommunications Union).
In addition, a method for compressing image data having a pseudo gradation produced by a dither pattern is disclosed in U.S. Pat. No. 6,201,614. According to the method disclosed in this document, a value of each pixel is compared with a threshold value so as to determine a range for each pixel.
However, in the method disclosed in the above-mentioned first document, the reference pattern is encoded when a designated image block matches the reference pattern. Therefore, a quantity of data to be transmitted increases corresponding to a sign of the reference pattern. In addition, as image data alter, it is rare that every pixel within a block matches. In this case, the quantity of data is further increased since differential data are transmitted.
On the contrary, the JBIG format has a relatively light load of a compression process, which can be performed at a high speed even on a computer. However, a compressibility of the JBIG format is not so high as a compressibility of other format such as the LZS format or the LZW format. In particular, when halftone data increases, the compressibility of the JBIG format decreases.
As to the method disclosed in the above-mentioned second document, a quantity of information is not decreased since a value is determined for each pixel. Therefore, another compression means are necessary for decreasing a quantity of information.
In either case of the conventional methods, when a gradation image is transmitted to a printer, image data having a pseudo gradation are compressed before transmission, or a gradation image before being processed to have a pseudo gradation is compressed before transmission. In the former case where the pseudo gradation image is compressed, a process becomes complicated because it includes a statistical process of data having a pseudo gradation image component, so there may be a limit in image components that can be extracted. In the latter case where the gradation image is compressed, it is not compatible to have both a high compressibility and a high image quality since components to be transmitted may include a component that will be omitted in the pseudo gradation process that will be performed later.